//
//  OrderItemCell.m
//  Traveling
//
//  Created by 曹秀云 on 15/6/5.
//  Copyright (c) 2015年 长沙市岳麓区立早网络科技有限公司. All rights reserved.
//

#import "OrderItemCell.h"
@interface OrderItemCell()

@property (weak, nonatomic) IBOutlet UIImageView *iconView;
@property (weak, nonatomic) IBOutlet UILabel *hotelNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *roomTypeLabel;

@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;

@end
@implementation OrderItemCell

+(instancetype)cellWithTableView:(UITableView *)tableView{
    static  NSString  *CellIdentiferId = @"OrderItemCell";
    OrderItemCell  *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentiferId];
    if (cell == nil) {
        NSArray *nibs = [[NSBundle mainBundle]loadNibNamed:@"OrderItemCell" owner:nil options:nil];
        cell = [nibs lastObject];
    }
    return cell;
}

- (void)awakeFromNib {
    // Initialization code
}

-(void)initData:(OrderEditResult *)result{
    [self.iconView sd_setImageWithURL:[NSURL URLWithString:result.img_url]];
    [self.hotelNameLabel setText:result.goods_name];
    [self.roomTypeLabel setText:result.room_type];
    [self.timeLabel setText:result.create_time];
    [self.priceLabel setText:[NSString stringWithFormat:@"总价:￥%.1f",result.rateprice]];
}

@end
